package com.mycom.service.impl;

import com.mycom.dao.TeamSaveItem2Dao;
import com.mycom.pojo.TeamSaveItem2;
import com.mycom.service.TeamSaveItem2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeamSaveItem2ServiceImpl implements TeamSaveItem2Service {
    @Autowired
    private TeamSaveItem2Dao teamSaveItem2Dao;

    @Override
    public boolean save(TeamSaveItem2 teamSaveItem2) {
        return teamSaveItem2Dao.save(teamSaveItem2) > 0 ? true : false;
    }

    @Override
    public List<TeamSaveItem2> findByFormId(Integer formId) {
        return teamSaveItem2Dao.findByFormId(formId);
    }

    @Override
    public boolean deleteByFormId(Integer formId) {
        return teamSaveItem2Dao.deleteByFormId(formId) >=0 ? true : false;
    }

    @Override
    public boolean update(TeamSaveItem2 teamSaveItem2) {
        return teamSaveItem2Dao.update(teamSaveItem2) > 0 ? true : false;
    }

    @Override
    public boolean deleteById(Integer id) {
        return teamSaveItem2Dao.deleteById(id) > 0 ? true : false;
    }
}
